package com.hiadechizi.dynamic.datasource;

import com.hiadechizi.dynamic.holder.DataSourceHolder;
import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;

/**
 * @author: wangdejun
 * @create: 2019-11-18 16:32
 **/
public class DynamicDataSource extends AbstractRoutingDataSource {

    @Override
    protected Object determineCurrentLookupKey() {
        return DataSourceHolder.get();
    }
}
